<template>
  <el-row>
    <el-col :span="24">
      <el-menu @select="MenuSelect" default-active="1">
        <el-menu-item index="1">
          <el-icon><icon-menu/></el-icon>
          <span>用户信息管理</span>
        </el-menu-item>
        <el-menu-item index="2">
          <el-icon><icon-menu/></el-icon>
          <span>上传记录管理</span>
        </el-menu-item>
        <el-menu-item index="3">
          <el-icon><icon-menu/></el-icon>
          <span>用户水稻种植分布</span>
        </el-menu-item>
        <el-menu-item disabled></el-menu-item>
        <el-menu-item disabled></el-menu-item>
        <el-menu-item disabled></el-menu-item>
        <el-menu-item disabled></el-menu-item>
        <el-menu-item disabled></el-menu-item>
        <el-menu-item disabled></el-menu-item>
        <el-menu-item disabled></el-menu-item>
        <el-menu-item disabled></el-menu-item>
        <el-menu-item disabled></el-menu-item>
      </el-menu>
    </el-col>
  </el-row>
</template>

<script setup>
import { useRouter  } from "vue-router"
import {Menu as IconMenu} from "@element-plus/icons-vue";

const router = useRouter();

function MenuSelect(idx){
  if (idx === "1") {
    router.replace({ path: "/admin/userInfo" }).catch((err) => {});
  }
  else if (idx === "2") {
    router.replace({ path: "/admin/uploadInfo" }).catch((err) => {});
  }
  else if (idx === "3") {
    router.replace({ path: "/admin/riceDistribution" }).catch((err) => {});
  }
}


</script>

<style>
.el-row {
  height: 100%;
}
.el-menu-item {
  height: 100px;
  line-height: 100px;
}
</style>